<script lang="tsx" setup>
import { defineComponent, onMounted, ref, reactive } from "vue";
import Dialog from "@/components/dialog";
import PageLoader from "@/components/page-loader/index.vue";

const tableMeta = reactive({
  column: [
    { label: "test", key: "name" },
    { label: "test1", key: "mobile", render: (row: any) => {
      return <p>{row.mobile}</p>
    } },
  ],
  row: [{ name: "邓海标", mobile: 16607574271 }],
});

onMounted(() => {
  Dialog(
    defineComponent({
      setup() {
        return () => <div></div>;
      },
    }),
    {}
  );
});
</script>

<template>
  <div class="index">
    <page-loader :column="tableMeta?.column" :row="tableMeta?.row">
      <template v-slot:default="{row}">
        <p>{{row.mobile}}</p>
      </template>
    </page-loader>
  </div>
</template>
